﻿using System;
using Abp.Domain.Entities;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace LeiliTech.@Model.ConfigInfo.ModelFolderName
{
    /// <summary>
    /// @Model.ConfigInfo.TableComment 的实体类
    ///</summary>
    [Table("@Model.ConfigInfo.TableName")]
    public class @Model.ConfigInfo.EntityName : Entity<string>
    {
       
        @foreach (var item in Model.ColList)
        {
        @:/// <summary>
        @:/// @item.Comment
        @:///</summary>
		@:[Column("@item.ColumnName")]
        if (item.CsharpType == "string")
        {
        @:[StringLength(@item.MaxLength)]
        }
        
        if(item.IsDataColumn && item.IsPK == true)
        {
        @:[Key]
        @:[Description("@item.Comment")]
        @:public override string Id { get => base.Id; set => base.Id = value; }
        }
        else
        {
        @:[Description("@item.Comment")]
        @:public @item.CsharpType @item.PropertyName { get; set; }
        }
		}
    }
}